﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using University.Workshop.Model;

namespace University.Workshop.DataAccess
{
    public class MedicalCenterEntities : DbContext
    {
        private static MedicalCenterEntities instance = new MedicalCenterEntities();

        private MedicalCenterEntities()
        {
            this.Database.Connection.ConnectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=MedicalDatabase;Integrated Security=True";
        }

        public static MedicalCenterEntities Instance
        {
            get
            {
                return instance;
            }
        }

        public DbSet<Appointment> Appointments { get; set; }
        public DbSet<Medicine> Medicines { get; set; }
        public DbSet<Patient> Patients { get; set; }
        public DbSet<MedicalSupplies> MedicalSupplies { set; get; }
        public DbSet<Prescription> Prescriptions { get; set; }
        public DbSet<User> Users { get; set; }
        public DbSet<Calendar> Calendars { get; set; }
        public DbSet<Consultation> Consultation { get; set; }
        public DbSet<OperationRoom> OperationRooms { get; set; }
        public DbSet<Bed> Beds { set; get; }
        public DbSet<Hospitalization> Hospitalizations { set; get; }
        public DbSet<Ambulance> Ambulances { set; get; }
        //public DbSet<AmbulanceCase> AmbulanceCases { set; get; }
        public DbSet<HospitalizationClinicalReport> HospitalizationClinicalReports { set; get; }
        public DbSet<HospitalizationMedicine> HospitalizationMedicines { set; get; }
        public DbSet<HospitalizationMedicalSupply> HospitalizationMedicalSupplies { set; get; }


        /// <summary>
        /// Cunstructor
        /// </summary>
        /*public MedicalCenterEntities()
        {
            this.Database.Connection.ConnectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=MedicalDatabase;Integrated Security=True";
        }*/
    }
}
